package com.loong.seller.common.backend.param;

import com.loong.common.validator.group.CommonInsert;
import com.loong.common.validator.group.CommonUpdate;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Description:
 * @Author: hzp
 * @Date: 2020-10-26 11:54
 */
@Data
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ShopContactParam {
    @NotNull(groups = {CommonUpdate.class},message = "id不能为空")
    private Long id;
    /**
     * 联系方式类型
     */
    @NotNull(groups = {CommonInsert.class},message = "联系方式类型不能为空")
    private Integer type;

    /**
     * 排序
     */
    @NotNull(groups = {CommonInsert.class},message = "排序不能为空")
    private Integer sort;

    /**
     * 名称
     */
    @NotBlank(groups = {CommonInsert.class},message = "名称不能为空")
    private String name;

    /**
     * 联系方式的值
     */
    @NotBlank(groups = {CommonInsert.class},message = "联系方式的值不能为空")
    private String value;

    /**
     * 开始时间[为空表示24小时]
     */
    @NotNull(message = "新增时开始时间不能为空",groups = {CommonInsert.class})
    private Date startTime;

    /**
     * 结束时间
     */
    @NotNull(message = "新增时结束时间不能为空",groups = {CommonInsert.class})
    private Date endTime;

    /**
     * 店铺id
     */
    @NotNull(groups = {CommonInsert.class},message = "店铺id不能为空")
    private Long shopId;
}
